package com.lzy.huijinjiazu.mvp.ui.adapter;

import android.text.Html;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jess.arms.utils.ArmsUtils;
import com.lzy.huijinjiazu.R;
import com.lzy.huijinjiazu.mvp.ui.activity.GoodsDetailActivity;

/**
 * Created by long on 2018/1/8.
 */

public class GoodsAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public GoodsAdapter() {
        super(R.layout.item_goods);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        ((TextView) helper.getView(R.id.tv_total)).setText(Html.fromHtml(ArmsUtils.getString(mContext, R.string.shopping_cart_money, "1298", "100")));
        helper.itemView.setOnClickListener(view -> {
            ArmsUtils.startActivity(GoodsDetailActivity.class);
        });
    }
}
